Skip to content

iOS Backup & Sync: "use NOOP's own folder" fallback + folder-picker instrumentation (#52)#66

Merged
ryanbr merged 1 commit into
mainfrom
ios-backup-internal-folder
Jul 8, 2026
Merged

iOS Backup & Sync: "use NOOP's own folder" fallback + folder-picker instrumentation (#52)#66
ryanbr merged 1 commit into
mainfrom
ios-backup-internal-folder

Conversation

@ryanbr

@ryanbr ryanbr commented Jul 8, 2026

Copy link
Copy Markdown
Owner

Fixes the practical blocker in #52: on some iOS 26 builds the system folder picker's Open button never fires, so users can't select any folder (three reports — fai150, KillaBoi confirm; works for pdomagala). Two prior blind picker fixes (#859 button-greyed, #1000a directoryURL) already shipped and didn't resolve it, and the symptom ("Open does nothing → swipe-dismiss → No folder selected") means the picker never returns a URL — not something our callback code drops.

Part 1 — picker-free fallback (the unblock)

NOOP already ships UIFileSharingEnabled + LSSupportsOpeningDocumentsInPlace (project.yml), so its own Documents folder is already visible in Files under On My iPhone → NOOP. New "Use NOOP's own folder" button backs up into Documents/Backups with no picker and no security-scoped bookmark:

  • resolveFolder() short-circuits to the internal folder when opted in; the existing scoped-access brackets just no-op (it's our own sandbox), so backup / restore / prune / auto-catch-up all work unchanged.
  • An explicit external pick (saveFolder) turns the fallback back off.
  • The "No folder selected" alert now points users straight at it.

Users read those backups from the Files app, or drag the folder into iCloud Drive to open on the Mac. (A first-class iCloud-Drive container is a separate, larger change.)

Part 2 — instrument the picker (so we can stop guessing)

There was zero logging in this path. Now the last picker delegate outcome (picked / cancelled) and, on a returned URL, whether scoped-access opened and the bookmark minted, are recorded and shown in the debug export. One on-device export now distinguishes:

  • cancelled / never used → the picker's Open never fired (iOS-side; fallback sidesteps it), vs
  • picked + a FAILED flag → a returned folder we failed to persist (our bug).

Testing

Swift can't build on the maintainer's box; needs CI + an on-device run. KillaBoi offered to sideload with a devcert — an instrumented build + his export pins the picker's future.

Files: Strand/Data/BackupSync.swift, Strand/Screens/BackupSyncView.swift, Strand/System/DocumentPicker.swift, Strand/System/DebugDataDiagnostics.swift.

…ker instrumentation (#52)

On some iOS 26 builds the system folder picker's Open button never fires, so
users can't select any folder (external) — three reports, works for one. Two
prior blind picker fixes (#859, #1000a) shipped and didn't resolve it.

Fix, two parts:

- Fallback: add "Use NOOP's own folder" — backs up inside NOOP's own
  Documents/Backups, already exposed in Files (UIFileSharingEnabled +
  LSSupportsOpeningDocumentsInPlace) under On My iPhone -> NOOP, with zero
  dependence on the picker. resolveFolder() short-circuits to it (no
  security-scoped bookmark; the existing scoped brackets no-op), so backup /
  restore / prune / auto-catchup all work unchanged. An explicit external pick
  turns it back off. The no-folder alert now points users at it.

- Instrumentation: record the last picker delegate outcome (picked / cancelled)
  and, on a returned URL, whether scoped-access opened and the bookmark minted,
  surfaced in the debug export. One on-device export now tells us whether the
  picker's Open never fired (iOS-side) vs a returned folder we failed to persist
  (our bug) — instead of guessing.
@ryanbr ryanbr force-pushed the ios-backup-internal-folder branch from 64b8348 to 1fe396f Compare July 8, 2026 05:12
@ryanbr ryanbr merged commit 0b3d1fd into main Jul 8, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant